

package cn.shengchao.examstar.distribute.infrastrure.mapper;

import cn.shengchao.examstar.distribute.infrastrure.po.DistributeNodeRoleChain;
import cn.shengchao.examstar.rpc.uddsys.req.PlatformDistributeUserPageQuery;
import cn.shengchao.examstar.rpc.uddsys.resp.DistributeUserVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DistributeNodeRoleChainMapper extends BaseMapper<DistributeNodeRoleChain> {


    String selectChainByDistributeUserAndType(@Param("userId") Long userId,
                                              @Param("distributeType") Integer distributeType);

    List<DistributeUserVo> selectPlatformRootDistributeUserList(@Param("query") PlatformDistributeUserPageQuery query);

    List<DistributeNodeRoleChain> selectDirectLowerNodeUserIds( @Param("distributeType") Integer distributeType,@Param("userId") Long userId);
}